Black white image compression having print density control

ABSTRACT

A scaling method for compressing a bitonal image that has print density control. A method is disclosed that comprises: using at least one computer to perform the steps of; selecting a line density setting, wherein the selecting is done automatically by analyzing data on the bitonal image, wherein the data is selected from the group consisting of: stroke width, font size, and print density and wherein the line density setting is selected from the group consisting of: light, normal and dark; determining a set of scaling rules based on the selected line density setting, wherein scaling rules map an input comprised of four pixel values to an output comprised of one pixel value, wherein the four pixel values include two values of a pixel pair and two values of two pixels that flank the pixel pair; for a normal setting provide for sixteen possible values for the input ranging from binary 0000 to 1111, and two possible values for the output of 0 and 1, and wherein the input values 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110 and 1111 map to outputs 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, respectively; and set the outputs associated with inputs 0011 and 0101 to 0 to achieve a darker image; and generating a scaled image by reducing pixel pairs down to single scaled pixel based on the set of scaling rules.

CROSS REFERENCE TO RELATED APPLICATION

The present invention is related to co-pending U.S. patent applicationSer. No. 10/706,584, filed on Nov. 12, 2003, entitled “System and Methodfor Providing Black White Image Compression,” which is herebyincorporated by reference.

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates generally to image compression, and morespecifically relates to a black white image data compression system andmethod having print density control.

2. Related Art

Since the advent of the modern information technology age, systems havebeen developed to store, process, or communicate black white image dataretrieved from printed documents. Common examples include, for instance,facsimile machines, copiers, scanners, etc. In many instances, thesystem is required to archive, store or transmit the black and whiteimage data. To improve performance, the image data is compressed,thereby reducing storage, processing and bandwidth requirements.

Black white image data compression techniques are well known in the art.Due to the universal need for encoding and decoding (namely compressionand decompression) of image data, the industry has adopted standards,which are widely used today. CCITT-G4, for example, is one of the mostpopular standards, finding its most extensive use in facsimile machines.Typical compression ratios using CCITT-G4 are on the order of 10-15×.Ultimately, the amount of compression is a function of the black whiteimage information/data content.

In the case of most black white compression standards, such as CCITT-G4,the compression process, which is engineered to be an encoding process,is lossless, i.e., following the decompression process, all informationpresent in the original image is fully recovered. Limitations exist withrespect to the amount of compression that can be achieved.

Numerous present day industries are increasingly required to archivevast amounts of information in electronic form. Examples include thefinance industry saving check images, the insurance industry savingdocuments, the health care industry saving medical records, the legalindustry, federal and state governments, etc. Accordingly, in order toreduce storage costs, data compression for black white images remains ofvital interest.

Often, it is not necessary for the compression to be completelylossless, i.e., some minor compression errors may be acceptable so longas the pertinent information contained on the document is not lost. Forinstance, imperfections on a compressed bank check image may beacceptable as long as legibility of the important information, e.g.,name, amount, account, etc., is not impacted by the compression. Animage compression system that could also enhance legibility of importantinformation would be of great use for industries seeking black whiteimage compression.

SUMMARY OF THE INVENTION

The present invention addresses the above-mentioned problems byproviding a bitonal (e.g., black white) image compression method havingprint density control for enhancing legibility of information on ascaled image.

In a first aspect, the invention provides a method for scaling a bitonalimage, comprising: using at least one computer to perform the steps of;selecting a line density setting, wherein the selecting is doneautomatically by analyzing data on the bitonal image, wherein the datais selected from the group consisting of: stroke width, font size, andprint density and wherein the line density setting is selected from thegroup consisting of: light, normal and dark; determining a set ofscaling rules based on the selected line density setting, whereinscaling rules map an input comprised of four pixel values to an outputcomprised of one pixel value, wherein the four pixel values include twovalues of a pixel pair and two values of two pixels that flank the pixelpair; for a normal setting provide for sixteen possible values for theinput ranging from binary 0000 to 1111, and two possible values for theoutput of 0 and 1, and wherein the input values 0000, 0001, 0010, 0011,0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110 and1111 map to outputs 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1,respectively; and set the outputs associated with inputs 0011 and 0101to 0 to achieve a darker image; and generating a scaled image byreducing pixel pairs down to single scaled pixel based on the set ofscaling rules.

BRIEF DESCRIPTION OF THE DRAWINGS

These and other features of this invention will be more readilyunderstood from the following detailed description of the variousaspects of the invention taken in conjunction with the accompanyingdrawings in which:

FIG. 1 depicts a bitonal compression system in accordance with thepresent invention.

FIG. 2 depicts a pixel reduction table in accordance with the presentinvention.

FIG. 3 depicts an exemplary smartscaling operation in which a normalline density setting is utilized in accordance with the presentinvention.

FIG. 4 depicts an exemplary smartscaling operation in which a light linedensity setting is utilized in accordance with the present invention.

FIG. 5 depicts an exemplary smartscaling operation in which a dark linedensity setting is utilized in accordance with the present invention.

DETAILED DESCRIPTION OF THE INVENTION

The present invention provides a methodology for compressing images,beyond the capabilities of standardized encoding technologies, such asthat provided by CCITT-G4. The compression technique described hereinalso provides a mechanism for providing print density control of linesor other printed data that appear on the image. Thus, lines or printeddata can be made lighter, normal or darker to improve legibility ofinformation.

While the embodiments described herein are described with reference toblack white images, it should be recognized that the scope of theinvention may be applied to any bitonal image. Moreover, while theinvention is described with reference to a CCITT-G4 encoding system, itis understood that any known bitonal encoding technique could beutilized. Examples include ABIC, JBIG, etc.

The present invention recognizes that two attributes of a bitonal (e.g.,black white) image are responsible for making the image legible andreadable. The first important attribute involves transitions. As a blackwhite image is scanned (similar in manner as a CRT scans a screen), onenotices the presence of transitions, both from white to black and blackto white. It is this aspect that gives the image contrast, readilynoticed by the human eye. When properly placed transitions occur onmultiple scan lines, legible and readable information begins to appear.

The second important attribute involves the very small (i.e., single)isolated features, namely, single black pixels between white pixels orsingle white pixels between black pixels.

These isolated features provide richness and sharpness to an image. Aslong as the scaling system is able to preserve these two attributes, andsubstantially maintain their relative geographic locations, atransformed image will offer near identical informational content.

Typical black white images (such as checks and other printed documents)have approximately 10% of their pixel space represented by black pixels.Since many of these black pixels will invariably be clustered together,a few transition points (relative to the entire pixel space) will beencountered when the image is scanned. Similarly, a typical black whiteimage will also contain occasional isolated features. For example, theremay be areas contained in the image where a single black pixel issandwiched between white pixels, or where a single white pixel issandwiched between black pixels.

A feature of the invention is to geometrically scale (referred to hereinas “smartscaling”) the image to reduce the pixel count while maintainingthe two aforementioned attributes. In the exemplary embodiment describedbelow, the pixel count is reduced by 2× in both the X and Y direction.However, it should be understood that any pixel reduction that maintainsthe two attributes could be utilized. Accordingly, smartscaling refersto any bitonal pixel reduction in which transition and isolatedattributes are preserved, and the attributes' relative geographicpositions are substantially maintained.

Referring now to FIG. 1, a compression system 10 is shown that receivesa black white image 18 and outputs compressed image data 20, which canbe, e.g., archived, transmitted, processed, etc. The black white image18 is first submitted to scaling system 12, which includes a pixelreduction system 13, a line density control system 15, and optionally,an automated density selection system 17. Pixel reduction system 13“smartscales” the image, resulting in a pixel reduction in whichtransition and isolated attributes are preserved, and the attributes'relative geographic positions are substantially maintained. Line densitycontrol system 15 provides a mechanism for selecting a light, normal ordark setting for the scaled image. Automated density selection system 17provides a mechanism for automatically determining whether the imageshould be made lighter, normal or darker. The output of scaling system12 is a smartscaled image 22, which is reduced in size from the originalblack white image 18, and which may have been made lighter or darker toimprove legibility.

Pixel scaling system 13 generates a scaled image by reducing pixel pairsdown to single scaled pixel based on a set of “scaling rules.” As willbe described in more detail below with reference to FIG. 2, the scalingrules may be incorporated into a pixel reduction table 21 that allowsfor a simple look-up procedure for scaling sets of contiguous pixels.Although this exemplary embodiment is implemented using a table, thescaling rules could be implemented in any fashion, e.g., as a “case”statement or a series of “if-then” statements in a software procedure,hardwired into an ASIC device, etc.

Line density control system 13 generally provides three densityselection settings: light, normal or dark. Thus, if the printed featuresor data on the black white image 18 are too light, they can be madedarker in the smartscaled image 22; if the printed features or data onthe black white image 18 are acceptable, then the smartscaled image 22can be generated with no density change; or if the printed features ordata on the black white image 18 are too dark, they can be made lighterin the smartscaled image 22. As will be described below, line densitycontrol system 13 implements density settings by making minor changes tothe scaling rules, e.g., as embodied in pixel reduction table 21.

Line density control system 15 can operate either as an automatedprocess or as a manual process. For the manual process, the end usercould make a manual density selection 19 of light, normal or dark, basedon their preference. For automated processing, an automated densityselection system 17 may be provided that automatically determineswhether the image should be made lighter, normal or darker. The processof making an automated decision regarding line density can be done usingany methodology. For instance, document features such as stroke width(pen thickness) or font size could be measured. Alternatively, eitherthe local or global print density of the image could be measured. In anycase, if the measured value fell below a first preset thresholdindicating narrow lines, then automated density selection system 17could set line density control system 15 to the dark setting.Alternatively, if the measured value was above a second preset thresholdindicating broad lines, then automated density selection system 17 couldset line density control system 15 to the light setting. Finally, if themeasured value was between the first and second preset thresholdindicating medium lines, then automated density selection system 17could set line density control system 15 to the normal setting.

Moreover, the image could be fragmented by an image processing system,e.g., into text and graphics portions, such that different regions ofthe image could be made lighter, normal or darker based on localmeasurements. Accordingly, for the purposes of this disclosure, the term“image,” may refer to a region of an image.

Although not required, other filtering and processing operations couldalso be applied to further improve the quality of the smartscaled image22. The smartscaled image 22 is then submitted to a CCITT-G4 encodingsystem 14, which performs an industry standard encoding operation(commonly used in facsimile operations and the like). Note that otherindustry standard encoding system could likewise be used.

Once encoded, the smartscaled image 22 can be retrieved by decoding thecompressed image data 20 with an industry standard CCITT-G4 decodingsystem 16. The scaled black white image can then be manipulated asneeded (e.g., displaying, printing, zooming, expanding) using knowtechniques and systems with aliasing corrections.

Using the compression system 10 described above, a size reduction ofabout 45% can be achieved over the compression achieved by a stand-aloneCCITT-G4 encoding system 14 working on an unscaled image. Note that asmartscaled image 22 may have limited, localized, geometric distortion.For instance, a single pixel may sometimes be displaced by one pixelposition. However, this distortion is only evident when viewed underhigh magnification. Accordingly, for most all applications (such as E13BOCR readability), any distortion will not diminish or affect theinformation content being presented in the image.

As noted above, scaling system 12 provides a pixel reduction in whichtransition and isolated attributes are preserved, and the attributes'approximate relative geographic positions are substantially maintained.

In an exemplary embodiment, a 2× scaling reduction is achieved usingscaling rules embodied in the pixel reduction table 21, which is shownin detail in FIG. 2. Specifically, pixel reduction table 21 provides asimple look-up tool for reducing two contiguous original pixel pairsdown to a single scaled pixel. In order to achieve this, the table 21dictates whether to assign the scaled pixel a value of 1 or 0 (1=white,0=black). Table 21 achieves this by examining the two original pixels(i.e., pixel pair) and the two flanking pixels that neighbor the twooriginal pixels.

In the table shown in FIG. 2, all possible combinations of four pixelvalues are shown in the input column and the index number is theirdecimal representation. It is the two central pixels of the input columnthat are replaced by the output. Output values are determined based onthe four digit binary input value such that transition and isolatedattributes are preserved in the scaled image, and the attributes'relative geographic positions are substantially maintained. Forinstance, it can be seen that “0 01 0” has an isolated feature (i.e., a1 sandwiched between zeros). Accordingly, this results in an outputvalue of 1. The input “1 10 0” has a transition from 1's to 0's.Accordingly, the output value is 0 to ensure that the transition ismaintained. Each possible four-digit binary input value ranging from0000-1111 therefore results in a unique one digit binary output, i.e., 0or 1.

Note that the output values shown in the table are the default valuesfor a normal setting. In order to effectuate a lighter or darkersetting, the one-digit binary output values can be manipulated as shownin the parenthesis of the output column. Namely, if a darker output isdesired, then the output values for 0011 and 0101 are changed from 1 to0. Alternatively, if a lighter output is desired, then the output valuesfor 1010 and 1100 are changed from 0 to 1. These values can be readilyaltered (e.g., with a software routine, using separate tables, etc.) asneeded by line density control system 15 to change the line densitysettings.

The table depicted in FIG. 2 provides a 2× image reduction. Obviously,various alternative embodiments (e.g., examining a six digit binaryinput number, providing a 3× image reduction, etc.) could be implementedto achieve similar results. In a typical embodiment, the image may befirst scaled in one direction, e.g., horizontally, and then be scaled inthe other direction, e.g., vertically.

FIGS. 3-5 depict exemplary smartscaling results in which the number ofpixels is reduced by a factor of two. FIG. 3 depicts results for anormal line density setting, FIG. 4 depicts results for a lighter linedensity setting, and FIG. 5 depicts results for a darker line densitysetting.

As depicted in FIG. 3, a first partial row 30 of pixels p0, p1 . . . p8is shown prior to scaling, and a second partial row 32 of pixels P1, P2,P3, is shown after scaling. Each pixel of the black white (or anybitonal) image 18 has a value of either 1 or 0, where for example 1represents white and 0 represents black. In this example, pixels p1-p6are scaled down to P1-P3, i.e., contiguous sets of pixel pairs p1-p2,p3-p4, and p5-p6 are scaled to P1, P2, and P3, respectively.

Accordingly, when scaling pixels p1 and p2, the scaling rules examinepixel values for p0, p1, p2 and p3, in this case 0010. The four valuesprovide the input into the table shown in FIG. 3. In this case, theinput 0011 refers to index number 03, and yields an output value of 1.Accordingly, the scaled value for the original pixel pair p1, p2 is 1.

Similarly, the scaled value P2 for the original pixel pair p3, p4 isdetermined by examining the four values of pixels p2-p5 (i.e., 1111). Inthis case, the input 1111 refers to index number 15, and yields anoutput value of 1. The scaled value P3 for the original pixel pair p5,p6 is determined by examining the four values of pixels p4-p7 (i.e.,1100). In this case, the input 1100 refers to index number 12, and alsoyields an output value of 0.

FIG. 4 shows the results for smartscaling the same pixel set p0-p8 witha lighter line density setting. In this case, the first pixel reductionp1, p2→P1 does not change from that described above, since the inputvalue 0011 is not affected by a change to the line density setting.Similarly, the second pixel reduction p3, p4→P2 does not change sincethe input value 1111 is not affected by a change to the line densitysetting. However, the third pixel reduction p5, p6→P3 is affected, sincethe result for input 1100 gets changed from a 0 to 1, relative to thenormal setting, when the lighter setting is selected (see FIG. 2).

FIG. 5 shows the results for smartscaling the same pixel set p0-p8 witha darker line density setting. In this case, the first pixel reductionp1, p2→P1 is affected, since the result for input 0011 gets changed froma 1 to 0, relative to the normal setting, when the darker setting isselected (see FIG. 2). The remaining pixel reductions p3, p4→P2 and p5,p6→P3 are not affected by the darker selection.

Accordingly, it can be seen that effectuating a change from normal tolighter or darker, is a relatively simple process that can be readilyintegrated into the scaling rules.

It is understood that the systems, functions, mechanisms, methods, andmodules described herein can be implemented in hardware, software, or acombination of hardware and software. They may be implemented by anytype of computer system or other apparatus adapted for carrying out themethods described herein. A typical combination of hardware and softwarecould be a general-purpose computer system with a computer program that,when loaded and executed, controls the computer system such that itcarries out the methods described herein. Alternatively, a specific usecomputer, containing specialized hardware for carrying out one or moreof the functional tasks of the invention could be utilized. The presentinvention can also be embedded in a computer program product, whichcomprises all the features enabling the implementation of the methodsand functions described herein, and which—when loaded in a computersystem—is able to carry out these methods and functions. Computerprogram, software program, program, program product, or software, in thepresent context mean any expression, in any language, code or notation,of a set of instructions intended to cause a system having aninformation processing capability to perform a particular functioneither directly or after either or both of the following: (a) conversionto another language, code or notation; and/or (b) reproduction in adifferent material form.

The foregoing description of the preferred embodiments of the inventionhas been presented for purposes of illustration and description. Theyare not intended to be exhaustive or to limit the invention to theprecise form disclosed, and obviously many modifications and variationsare possible in light of the above teachings. Such modifications andvariations that are apparent to a person skilled in the art are intendedto be included within the scope of this invention as defined by theaccompanying claims.

1. A method for scaling a bitonal image, comprising: selecting a linedensity setting, wherein the selecting is done automatically byanalyzing data on the bitonal image, wherein the data is selected fromthe group consisting of: stroke width, font size, and print density andwherein the line density setting is selected from the group consistingof: light, normal and dark; determining a set of scaling rules based onthe selected line density setting, wherein scaling rules map an inputcomprised of four pixel values to an output comprised of one pixelvalue, wherein the four pixel values include two values of a pixel pairand two values of two pixels that flank the pixel pair; for a normalsetting provide for sixteen possible values for the input ranging frombinary 0000 to 1111, and two possible values for the output of 0 and 1,and wherein the input values 0000, 0001, 0010, 0011, 0100, 0101, 0110,0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110 and 1111 map to outputs0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, respectively; and setthe outputs associated with inputs 0011 and 0101 to 0 to achieve adarker image; and generating a scaled image by reducing pixel pairs downto single scaled pixel based on the set of scaling rules.
 2. The methodof claim 1, wherein the scaling rules set the outputs associated withinputs 1010 and 1100 to 1 to achieve a lighter image.